/**
 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Autogenerated file -- DO NOT EDIT!
% Compiler::intrinsics.select(&:has_impl?).each do |intrinsic|
%   # dynamic intrinsics doesn't support in inst_generator
%   next if intrinsic.is_dynamic?
if (EncodesBuiltin(GetGraph()->GetRuntime(), RuntimeInterface::IntrinsicId::<%= intrinsic.entrypoint_name %>, arch.first)) {
    EXPECT_TRUE(TryEncode(DataType::<%= intrinsic.return_type %>, RuntimeInterface::IntrinsicId::<%= intrinsic.entrypoint_name %>, arch.first, true))
        << "intrinsic <%= intrinsic.entrypoint_name %>" << ", arch " << arch.second;
} else {
% if intrinsic.respond_to? 'codegen_func'
    // cannot verify <%= intrinsic.entrypoint_name %> behavior because it is not supported by some encoders
% else
    // cannot verify <%= intrinsic.entrypoint_name %> behavior in Release build
#ifndef NDEBUG
    EXPECT_DEATH(
        TryEncode(DataType::<%= intrinsic.return_type %>, RuntimeInterface::IntrinsicId::<%= intrinsic.entrypoint_name %>, arch.first, false),
        "")  // actual expected message is "This line should be unreachable" but sometimes gtest does not capture stderr output
        << "intrinsic <%= intrinsic.entrypoint_name %>"
        << ", arch " << arch.second;
#endif
% end
}
% end
